﻿@using VipSoft.WebUtility
@using Webdiyer.WebControls.Mvc
@using VipSoft.CMS.Core.Entity
@model PagedList<Feedback>
@{
    ViewBag.Title = "在线留言";
    Layout = "~/Areas/VipSoft/Views/Shared/_AdminLayout.cshtml";
}


<div class="row">
    <div class="col-xs-12">
        <div class="widget-box ui-sortable-handle">
            <div class="widget-header widget-header-large">
                <h4 class="widget-title">@ViewBag.SubTitle</h4>

                <div class="widget-toolbar">
                    <a href="#" data-action="settings">
                        <i class="ace-icon fa fa-cog"></i>
                    </a>

                    <a href="#" data-action="reload">
                        <i class="ace-icon fa fa-refresh"></i>
                    </a>

                    <a href="#" data-action="collapse">
                        <i class="ace-icon fa fa-chevron-up"></i>
                    </a>

                    <a href="#" data-action="close">
                        <i class="ace-icon fa fa-times"></i>
                    </a>
                    <a href="@Url.Action("Add", new { cid = @Request.RequestContext.RouteData.Values["cid"], mid = @Request.RequestContext.RouteData.Values["mid"] })" title="新增"><i class="fa fa-plus"></i></a>
                </div>
            </div>

            <div class="widget-body">
                <div class="widget-main no-padding">

                    <table class="table table-striped table-bordered table-hover data-table">
                        <thead>
                            <tr>
                                <th style="width:40px">
                                    <div class="icheckbox_flat-blue" style="position: relative;">
                                        <input type="checkbox" id="title-table-checkbox" name="title-table-checkbox" style="position: absolute; opacity: 0;">
                                        <ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background-color: rgb(255, 255, 255); border: 0px; opacity: 0; background-position: initial initial; background-repeat: initial initial;"></ins>
                                    </div>
                                </th>
                                <th style="width: 60px">编号 </th>
                                <th>标题 </th>
                                <th style="width: 100px">留言者 </th>
                                <th style="width: 100px">留言日期 </th>
                                <th style="width: 200px"></th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach (var item in Model)
                            {
                                <tr>
                                    <td class="tdCenter">
                                        <input name="@item.ID" id="@item.ID" onclick="UnSelectAll('chkSelectAll')" type="checkbox" value="@item.ID" />
                                    </td>
                                    <td class="tdCenter">
                                        @item.ID
                                    </td>
                                    <td>
                                        @item.Title
                                    </td>
                                    <td class="tdCenter">
                                        @item.Name
                                    </td>
                                    <td>
                                        @String.Format("{0:d}", item.CreateDate)
                                    </td>
                                    <td class="tdCenter">
                                        <a class="btn btn-primary btn-xs" href="@Url.Action("Add", new { id = item.ID, cid = @Request.RequestContext.RouteData.Values["cid"], mid = @Request.RequestContext.RouteData.Values["mid"] })">查看</a>
                                        <a class="btn btn-danger btn-xs" href="javascript:;" onclick="deleteFeedback(this,@item.ID)">删除</a>
                                    </td>
                                </tr>
                            } 
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

    </div>
</div>
 
@section Script {

    <script src="@Url.Content("~/Scripts/Admin/VipSoft.CMS.Feedback.js")" type="text/javascript"></script>
    <script type="text/javascript">
        //定义mid,cid供VipSoft.CMS.Category.js中的变量使用。
        var mid = @Request.RequestContext.RouteData.Values["mid"];
        var cid = @Request.RequestContext.RouteData.Values["cid"];   
    </script>
}
